import { PrimaryColumn , Column, Entity , OneToMany } from 'typeorm';
import { Teams } from './teams';
import { Players } from './players';

@Entity()
class Leagues {

    @PrimaryColumn({
        type: "varchar",
        length: 12,
        comment: "联盟id"
    })
    id: string;

    @Column({
        type: "varchar",
        length: 255,
        nullable: false,
        comment: "联盟名称"
    })
    name: string;

    // @OneToMany(type => Teams,teams => teams.leagues)
    // teams?: Teams;

    // @OneToMany(type => Teams,teams => teams.leagues)
    // players?: Players;

}

export { Leagues }